﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using DongleManage.Model.BaseClass;
using System.Data;

namespace DongleManage.Model.Common
{

		
	/// <summary>
	///  区域信息
	/// </summary>
	/// <remarks>
	/// 该实体由工具生成，尽量不要手动修改
	/// </remarks>
	[DataContract]
	public partial class RegionsInfoEntity:BaseEntity
	{
		#region 属性、变量声明
		#region 主属性 --对应数据表主键
		/// <summary>			
		/// 区域编码
		/// </summary>
		/// <remarks>表RegionsInfo主键</remarks>
        [DisplayName("区域编码")]
		[DataMember]
		public String Code
        {
            get;
            set;
        }
		#endregion
		
		#region 属性
		
		/// <summary>
		/// 区域名称
		/// </summary>
        [DisplayName("区域名称")]
        [Required(ErrorMessage = "不允许为空!")]
        [StringLength(128, ErrorMessage = "请勿输入超过 128 个字!")]
        
		[DataMember]
		public String Name
        {
            get;
            set;
        }

        /// <summary>
        /// 邮编
        /// </summary>
        [DisplayName("邮编")]
        [Required(ErrorMessage = "不允许为空!")]
        [StringLength(24, ErrorMessage = "请勿输入超过 24 个字!")]

        [DataMember]
        public String PostCode
        {
            get;
            set;
        }
		#endregion

		#endregion 属性、变量声明

        public RegionsInfoEntity(IDataReader dataReader)
            : base(dataReader)
        {
            Code =Convert.IsDBNull(dataReader["Code"])?string.Empty:dataReader["Code"] as string;
            Name = Convert.IsDBNull(dataReader["Name"]) ? string.Empty : dataReader["Name"] as string;
            PostCode = Convert.IsDBNull(dataReader["PostCode"]) ? string.Empty : dataReader["PostCode"] as string;
        }
	    public RegionsInfoEntity()
        {
            Code = string.Empty;
            Name = string.Empty;
            PostCode = string.Empty;
        }
	}
}
